﻿using System;
using System.Collections.Generic;
using System.Text;
using Tao.Sdl;

namespace Ommf
{
    public class Music
    {
        private IntPtr musicHandle;

        internal Music(string filename)
        {
            musicHandle = SdlMixer.Mix_LoadMUS(filename);
        }

        internal void Play(bool loop)
        {
            SdlMixer.Mix_PlayMusic(musicHandle, loop ? -1 : 0);
        }

        internal void Dispose()
        {
            SdlMixer.Mix_FreeMusic(musicHandle);
        }
    }
}
